package com.ftg.mall.mapper.pms;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ftg.mall.base.entity.pms.ProductFullReduction;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 产品满减表(只针对同商品) Mapper 接口
 * </p>
 *
 * @author wangty
 * @since 2022-11-15
 */
@Mapper
public interface ProductFullReductionMapper extends BaseMapper<ProductFullReduction> {

    /**
     * 满减表联表分页查询
     * @param page
     * @param limits
     * @return
     */
    @Select("select * from pms_product_full_reduction p left join pms_product s on p.product_id = s.id limit #{page},#{limits} ")
    List<Map<String, Object>> productPage(@Param("page") Integer page,@Param("limits") Integer limits);
}
